package old;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JPopupMenu;

import org.openstreetmap.gui.jmapviewer.JMapViewer;


class PopUp extends MouseAdapter {
	
	private JPopupMenu popup;
	
	public PopUp(JMapViewer comp) {
		popup = new JPopupMenu();
		comp.add(popup);
		//popup.add(new ShowURL(comp, true));
		//popup.add(new ShowURL(comp, false));
	}
	
	public void mouseReleased(MouseEvent e) {
		if (e.isPopupTrigger()) {
			popup.show(e.getComponent(), e.getX(), e.getY());
		}
	}
	
}